package com.hahaduo.bee.web.resource;

import java.util.List;

import javax.annotation.Resource;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.hahaduo.bee.dao.entity.AccountType;
import com.hahaduo.bee.dao.entity.User;
import com.hahaduo.bee.service.UserService;
import com.sun.jersey.api.spring.Autowire;
import com.sun.jersey.spi.resource.Singleton;

@Autowire
@Singleton
@Consumes({"application/xml", "application/json"})
@Produces(MediaType.APPLICATION_JSON)
@Path("acctype")
public class AccountTypeResource {

	@Resource
	private UserService userService;
	
    @GET
    public List<User> list() {
        return userService.list();
    }

    @GET
    @Path("{id}")
    public AccountType show(@PathParam("id") Long id) {
        return new AccountType("aaa", "bbb", "ccc", 12L);
    }

}